package com.zkthink.ceres.finance.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zkthink.base.entity.Entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import java.time.LocalDateTime;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;


/**
 * <p>
 * 实体类
 * 会员收款帐户表
 * </p>
 *
 * @author chenke
 * @since 2020-05-25
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("ceres_member_collecting_account")
@ApiModel(value = "MemberCollectingAccount", description = "收款帐户表")
@AllArgsConstructor
public class MemberCollectingAccount extends Entity<Long> {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("会员id")
    @TableField("mid")
    private Long mid;
    /**
     * 持卡人姓名
     */
    @ApiModelProperty(value = "持卡人姓名")
    @Length(max = 200, message = "持卡人姓名长度不能超过200")
    @TableField(value = "cardholder_name", condition = LIKE)
    @Excel(name = "持卡人姓名")
    private String cardholderName;

    /**
     * 卡号
     */
    @ApiModelProperty(value = "卡号")
    @Length(max = 250, message = "卡号长度不能超过250")
    @TableField(value = "card_number", condition = LIKE)
    @Excel(name = "卡号")
    private String cardNumber;

    /**
     * 银行
     */
    @ApiModelProperty(value = "银行")
    @Length(max = 300, message = "银行长度不能超过300")
    @TableField(value = "bank", condition = LIKE)
    @Excel(name = "银行")
    private String bank;

    /**
     * 手机号码
     */
    @ApiModelProperty(value = "手机号码")
    @Length(max = 100, message = "手机号码长度不能超过100")
    @TableField(value = "phone", condition = LIKE)
    @Excel(name = "手机号码")
    private String phone;


    @Builder
    public MemberCollectingAccount(Long id, Long createUser, LocalDateTime createTime, Long updateUser, LocalDateTime updateTime,
                                   Long mid, String cardholderName, String cardNumber, String bank, String phone) {
        this.id = id;
        this.createUser = createUser;
        this.createTime = createTime;
        this.updateUser = updateUser;
        this.updateTime = updateTime;
        this.cardholderName = cardholderName;
        this.cardNumber = cardNumber;
        this.bank = bank;
        this.phone = phone;
        this.mid = mid;
    }

}
